<!-- Graph -->
<div class="fieldsets">
  <fieldset style="width: 640px">
    <legend>Graph</legend>
    <% unless params[:search].nil? %>
      <% if @searched_role %>
        <p>Role: <b><%= @searched_role.name_with_code %></b></p>
      <% end %>
      <% if @searched_project %>
        <p>Project: <b><%= @searched_project.name %></b></p>
      <% end %>
      <% if @searched_user %>
        <p>User: <b><%= @searched_user.name %></b></p>
      <% end %>
      <% unless params[:search][:date_from].blank? %>
        <p>From date: <b><%= params[:search][:date_from] %></b></p>
      <% end %>
      <% unless params[:search][:date_to].blank? %>
        <p>To date: <b><%= params[:search][:date_to] %></b></p>
      <% end %>
      <% if params[:search][:date_from].blank? and params[:search][:date_to].blank? %>
        <% if session[:year] %>
          <p>For year: <b><%= session[:year] %></b></p>
        <% end %>
        <% if session[:month] %>
          <p>For month: <b><%= Date::MONTHNAMES[session[:month].to_i] %></b></p>
        <% end %>
      <% end %>
    <% end %>

    <%= render :partial => '/your_data/graph_flash', :locals => {:data_url => '/activities/graph_xml'} %>

    <!-- Showing statistics -->
    <%= render :partial => '/your_data/graph_statistics', :locals => {:show_role => true} %>

  </fieldset>
  <!-- End of graph -->

  <%= back_link unless params[:search].nil? %>
</div>
